home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Utilities / System / Keyboards / Mouse Utilities / SerialMouseDriver1.0 / MeeseDoc next >
Text File  |  1992-05-22  |  4KB  |  85 lines

  1. Serial Mouse Driver
  2. ©1992 Charles Rentmeesters
  3.  
  4. CDware.  If you use this software, you've probably saved a bundle on getting a IBM type
  5. serial mouse, so spend a few bucks more and send me a CD.  Either Musical CD's or 
  6. CDROM's.  Send me something unique, send me something original.  If you're in a foreign
  7. country send me a CD in your native language.
  8. Send to:
  9.     Charles Rentmeesters
  10.     410 N Carroll St
  11.     Madison, WI 53703
  12.     USA
  13.  
  14. I'd love to hear your sugestions.  Email address:
  15.     roach@khan.cs.wisc.edu
  16.     rentmees@cae.wisc.edu
  17.     
  18. This cdev/init allows you to connect a IBM type serial mouse to your Macintosh, and use
  19. that instead of the standard Macintosh mouse.  It works with Microsoft and Mouse Systems
  20. compatible mice.  (just about the only two types of serial mice that are out there).  You
  21. can even use IBM type serial trackballs with it!  Connect the mouse up to one of the serial
  22. ports of your Macintosh, and drop this cdev/init into your System folder.  Use the control
  23. panel or System 7 to set-up the mouse driver.  This allows you to set up which port the
  24. mouse is connected to, and what type of mouse it is.  It also allows you to modify the
  25. event the mouse sends for each of the mouse buttons.  Software written using the
  26. Symantic Think C compiler, and tested on a Macintosh SE running system 7.0.
  27.  
  28. Connecting up the Serial Mouse:
  29. To connect the serial mouse up to your Macintosh, you will need a serial cable.  Some 
  30. serial mice can just use a standard modem serial cable that you can buy from many
  31. computer stores.  If that doesn't work, you can make your own serial cable for the mouse.
  32.  
  33. This is the standard pinouts for a serial mouse cable:
  34.     Macintosh        Mouse
  35.     8minidin        db9
  36.     Pin #            Pin #
  37.         1                    7
  38.         3                    3
  39.         4                    5
  40.         5                    2
  41.         8                    5
  42.         
  43. Helpful hints:
  44. When installing the mouse driver, be sure you have a back-up way to move the mouse in
  45. case you don't get it to work right away.  Either keep your old ADB mouse connected,
  46. or have Easy Access installed in your system.  Also, terminal programs which are set-up
  47. for the same port as the Serial Mouse Driver is set up for may crash.  When making the
  48. serial cable, it's easy to buy a Macintosh serial cable, and cut it in half and then solder
  49. the db9 connector to the cut end.  That way you don't have to do any soldering to a 8pin
  50. mini din.
  51.  
  52. Serial Mouse Protocol (for Mouse Systems Mice):
  53. Events are sent in 5 byte packets at 1200baud.  The first byte is a sync byte, in the 
  54. format 10000LMR, anding any byte with $F8 and then comparing to $80 will tell you if
  55. it's the sync byte.  The bits L, M, and R and the status of the mouse buttons. 
  56. 1 = button up, 0 = button down.  The second byte in the packet is the horizontal change
  57. in pixels.  The third byte is a vertical change.  The fourth and fifth bytes are horizontal
  58. and vertical change bytes respectively.  
  59.  
  60. Serial Mouse Protocol (for Microsoft Mice):
  61. Events are sent in 3 byte packets at 1200baud.  The first byte is a sync byte, in the 
  62. format 11LRYYXX, anding any byte with $C0 and then comparing to $C0 will tell you if
  63. it's the sync byte.  The bits L, and R and the status of the mouse buttons. 
  64. 0 = button up, 1 = button down.  YY is the most significant two bits of the vertical 
  65. movement.  XX is the most significant two bits of the horizontal movement.  The second
  66. byte in the packet has the format 10XXXXXX.  These are the lower 6 bits of the horizontal
  67. movement.  This must be combined with the two bits in the sync byte to get the value
  68. for the horizontal movement.  The third byte is of the format 10YYYYYY.  This is the 
  69. lower 6 bits of the vertical movement.  This must be combined with the sync byte like
  70. the horizontal movement to get the value for the vertical movement.
  71.  
  72. Future ideas for the mouse driver:
  73. I'm thinking about making a hardware solution to the problem as well, so that you can 
  74. hook the serial mouse up to a converter connected to the ADB port.  Another idea is to
  75. make an ADB converter for IBM AT compatible keyboards.
  76.  
  77. Other software by me:
  78. "Chuck's Printer Driver"  -- Allows you to connect an Epson compatible 9-pin or 24-pin
  79.     printer up to your Mac.
  80.     
  81. Disclaimer:
  82. I take no responsibility for anything you my do to damage or destroy your Mac.  This
  83. software is used at your own risk.  Microsoft, Mouse Systems, Epson, Macintosh, 
  84. Think C, and any other trademarks are copywrite of their respective owners.
  85.